home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir42 / gnudbm14.zip / MAKEFILE < prev    next >
Text File  |  1990-08-24  |  4KB  |  160 lines

  1. # Makefile for gdbm.
  2.  
  3. # MS-DOS port (c) 1990 by Thorsten Ohl, td12@@ddagsi3.bitnet
  4. #
  5. # To this port, the same copying conditions apply as to the
  6. # original release.
  7. #
  8. # IMPORTANT:
  9. # This file is not identical to the original GNU release!
  10. # You should have received this code as patch to the official
  11. # GNU release.
  12. #
  13. # MORE IMPORTANT:
  14. # This port comes with ABSOLUTELY NO WARRANTY.
  15. #
  16. # $Header: e:/gnu/gdbm/RCS/makefile.'v 1.4.0.2 90/08/16 10:40:52 tho Exp $
  17.  
  18. BINDIR = c:/bin
  19. LIBDIR = e:/libs/msc
  20. INCDIR = e:/includes/msc
  21.  
  22. INSTALL = cp -v
  23. DISK    = b:
  24. ZIPFILE = gdbm.zip
  25.  
  26. MODEL    = L
  27. CFLAGS    = -Ox -W4 -A$(MODEL) -DSYSV -Za
  28. LDFLAGS = /st:0x8000 /e
  29. CC    = cl
  30. AR    = lib
  31. ARFLAGS = -+
  32. LINK    = link
  33.  
  34. GDBMLIB = $(MODEL)gdbm.lib
  35.  
  36.  
  37. DBM_CF = dbminit.c delete.c fetch.c store.c seq.c
  38. NDBM_CF = dbmopen.c dbmdelet.c dbmfetch.c dbmstore.c dbmseq.c \
  39.     dbmclose.c dbmdirfn.c dbmpagfn.c
  40. GDBM_CF = gdbmopen.c gdbmdele.c gdbmfetc.c  gdbmstor.c gdbmclos.c \
  41.     gdbmreor.c gdbmseq.c \
  42.     bucket.c falloc.c findkey.c global.c hash.c update.c version.c
  43.  
  44. HFILES = gdbmdefs.h extern.h gdbmerrn.h systems.h dbm.h ndbm.h
  45.  
  46. MSCFILES = copying changelo makefile readme gdbm.pro conv2gdb.c
  47.  
  48. TESTFILES = testdbm.c testndbm.c testgdbm.c
  49.  
  50.  
  51. # RCSFILES= $(patsubst %, RCS/%'v, $(DBM_CF) $(NBM_CF) $(GBM_CF)) \
  52. #        RCS/makefile.'v
  53. # MISC      = RCS/readme'v changelo RCS/changelo.'v makepat mkpatch
  54.  
  55. DBM_OF = dbminit.obj delete.obj fetch.obj store.obj seq.obj
  56. NDBM_OF = dbmopen.obj dbmdelet.obj dbmfetch.obj dbmstore.obj dbmseq.obj \
  57.     dbmclose.obj dbmdirfn.obj dbmpagfn.obj
  58. GDBM_OF = gdbmopen.obj gdbmdele.obj gdbmfetc.obj  gdbmstor.obj gdbmclos.obj \
  59.     gdbmreor.obj gdbmseq.obj \
  60.     bucket.obj falloc.obj findkey.obj global.obj hash.obj update.obj
  61.  
  62. .c.obj:
  63.     $(CC) -c $(CFLAGS) $<
  64.  
  65. # .PHONY: allgdbm
  66. phony.1: $(GDBMLIB) testgdbm.exe testdbm.exe testndbm.exe
  67.     touch phony.1
  68.  
  69. # .PHONY: install
  70. # install: $(GDBMLIB) gdbmdefs.h
  71.     cp $(GDBMLIB) $(LIBDIR)
  72.     cp gdbmdefs.h $(INCDIR)
  73.  
  74. $(GDBMLIB): version.c $(GDBM_OF) $(NDBM_OF) $(DBM_OF)
  75.     $(CC) $(CFLAGS) -c version.c
  76. #    $(AR) $@ $(ARFLAGS) version $(subst version.c,,$?);
  77.     $(AR) $(GDBMLIB) @gdbmlib.inp;
  78.  
  79. gdbm.h: gdbm.pro gdbmerrn.h
  80.     cp gdbm.pro gdbm.h
  81.     grep _ gdbmerrn.h >> gdbm.h
  82.  
  83. gdbm.pro: RCS/gdbm.p'v
  84.     $(CO) $(COFLAGS) $@
  85.  
  86. testgdbm.exe: testgdbm.obj $(GDBMLIB)
  87.     $(LINK) $(LDFLAGS) testgdbm, $@,, $(GDBMLIB);
  88.  
  89. testdbm.exe: testdbm.obj $(GDBMLIB)
  90.     $(LINK) $(LDFLAGS) testdbm, $@,, $(GDBMLIB);
  91.  
  92. testndbm.obj: testndbm.c
  93.     $(CC) -c $(CFLAGS) -DGNU testndbm.c
  94.  
  95. testndbm.exe: testndbm.obj $(GDBMLIB)
  96.     $(LINK) $(LDFLAGS) testndbm, $@,, $(GDBMLIB);
  97.  
  98.  
  99. .PHONY: zip disk
  100. zip: $(ZIPFILE)
  101. disk: $(DISK)/$(ZIPFILE)
  102.  
  103. $(ZIPFILE): $(RCSFILES) $(MISC)
  104.     pkzip -frp $@
  105.  
  106. $(DISK)/$(ZIPFILE): $(ZIPFILE)
  107.     cp $< $@
  108.     pkunzip -t $@ | grep -vw OK
  109.  
  110. .PHONY: clean
  111. clean:
  112.     rm -f gdbm.h *.obj *.map *.bak tags
  113.     rcsclean *.c *.h *.pro makefile
  114.  
  115. tags: $(GDBM_CF) $(HFILES) $(TESTFILES) $(NDBM_CF) $(DBM_CF)
  116.     etags -t *.c *.h
  117.  
  118. # dbm files
  119. dbminit.obj:    gdbmdefs.h extern.h gdbmerrn.h systems.h
  120. delete.obj:    gdbmdefs.h extern.h
  121. fetch.obj:    gdbmdefs.h extern.h
  122. store.obj:    gdbmdefs.h extern.h
  123. seq.obj:    gdbmdefs.h extern.h
  124.  
  125. # ndbm files
  126. dbmopen.obj:    gdbmdefs.h extern.h gdbmerrn.h systems.h
  127. dbmdelet.obj:    gdbmdefs.h extern.h
  128. dbmfetch.obj:    gdbmdefs.h extern.h
  129. dbmstore.obj:    gdbmdefs.h extern.h
  130. dbmseq.obj:    gdbmdefs.h extern.h
  131. dbmclose.obj:    gdbmdefs.h systems.h
  132. dbmpagfn.obj:    gdbmdefs.h extern.h
  133. dbmdirfn.obj:    gdbmdefs.h extern.h
  134.  
  135.  
  136. # gdbm files
  137. gdbmclos.obj:    gdbmdefs.h systems.h
  138. gdbmdele.obj:    gdbmdefs.h gdbmerrn.h systems.h
  139. gdbmfetc.obj:    gdbmdefs.h gdbmerrn.h systems.h
  140. gdbmopen.obj:    gdbmdefs.h gdbmerrn.h systems.h
  141. gdbmreor.obj:    gdbmdefs.h gdbmerrn.h systems.h extern.h
  142. gdbmseq.obj:    gdbmdefs.h systems.h
  143. gdbmstor.obj:    gdbmdefs.h gdbmerrn.h systems.h
  144.  
  145. # gdbm support files
  146. bucket.obj:    gdbmdefs.h systems.h
  147. falloc.obj:    gdbmdefs.h systems.h
  148. findkey.obj:    gdbmdefs.h systems.h
  149. global.obj:    gdbmdefs.h gdbmerrn.h
  150. hash.obj:        gdbmdefs.h
  151. update.obj:    gdbmdefs.h systems.h
  152. version.obj:
  153. extern.h:
  154.  
  155. # other programs
  156. testgdbm.obj:    gdbmdefs.h extern.h gdbmerrn.h systems.h
  157. testdbm.obj:    dbm.h
  158. testndbm.obj:    ndbm.h
  159. conv2gdb.obj:    gdbm.h
  160.